package edu.ujf.sharepas.impl;

import java.rmi.RemoteException;
import java.util.ArrayList;

import edu.ujf.sharepas.rmi.Client;

public class Friend extends User{

	public Friend(Client c) {
		super(c);
    	this.libFilePath = Constante.getSharePasProperty(Constante.Property.FRIEND_PATH.toString()+this.getName()+".lib") ;

		
	}
	
	public Friend(Client c,int id,String name, String av, String message){
        super(c,id,name,av,message);
    	this.libFilePath = Constante.getSharePasProperty(Constante.Property.FRIEND_PATH.toString()+this.getId()+".lib") ;

    }

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public ShareFile getShareFile(String FileName){
    	if( !isConnected() ){
    		return null;
    	}else{
    		Client c = getClient();
    		try {
				return c.getShareFile(FileName);
			} catch (RemoteException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return null;
			}
    	}
    }
}
